home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 4 / CDPD_IV.bin / e / mailinglists / amigae.0793july.archive / 000114_crash!cup.port….com!Politikill_Fri, 30 Jul 93 13:56:36 PST.msg < prev    next >
Internet Message Format  |  1994-05-26  |  3KB

  1. Received: by bkhouse.cts.com (V1.16/Amiga)
  2.     id AA00000; Fri, 30 Jul 93 13:56:36 PST
  3. Received: from nova.unix.portal.com by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #15) id m0oLzoW-0000auC; Fri, 30 Jul 93 12:08 PDT
  5. Received: by nova.unix.portal.com (5.65b/4.1 1.386) 
  6.     id AA22660; Fri, 30 Jul 93 12:12:20 -0700
  7. Received: from hobo  by portal.unix.portal.com (1.689) 
  8.     id AA29910; Fri, 30 Jul 93 12:12:19 -0700
  9. Received: by hobo.corp.portal.com (4.1/4.0.3 1.68) 
  10.     id AA23438; Fri, 30 Jul 93 12:12:17 PDT
  11. Return-Path: <Politikill@cup.portal.com>
  12. Lines: 69
  13. Date: Fri, 30 Jul 93 12:12:16 PDT
  14. Message-Id: <9307301212.2.12188@cup.portal.com>
  15. X-Origin: The Portal System (TM)
  16. From: Politikill@cup.portal.com
  17. To: AmigaE@bkhouse.cts.com
  18. Subject: Re: MidStr
  19.  
  20. >Hi, Jeffrey.  In response to your message:
  21. >
  22. >>    I can't get MidStr() to work right.  It is reading it from the starting
  23. >>point right, but I can't get it to stop! I am trying to get a version string
  24. >>pulled out of a buffer I am getting from Read(). Before vtst was defined as a
  25. >>string, it was working somewhat well (I was getting what I wanted), but I am
  26. >>not sure whether it was stoping where I wanted. What I need is the original
  27. >>version string, with the revision number bumped up by one.
  28. >
  29. >=======================================================================
  30. >
  31. >PROC findver(pos) /* pos is found in the prior proc */
  32. >  DEF endpos,
  33. >      vers,
  34. >      per,
  35. >      vn,
  36. >      vp,
  37. >      vns,
  38. >      nvers,
  39. >      rvers,
  40. >      vtst[80]:STRING
  41. >
  42. >  endpos:=InStr(filbuf,'\n',pos) /* finding then end of the line */
  43. >******************************************************************************
  44. *
  45. >*** Your problem starts here.  vers is uninitialized, so it contains a value
  46. >*** that looks like an address.  MidStr() copies characters to the nonexistent
  47. >*** string at "address" vers.  You need to declare these as STRING or allocate
  48. >*** the using String().   Basically, this is copying characters into random
  49. >*** memory locations, a very effective way to corrupt your memory :(  I notice
  50. d
  51. >*** this happening in several places in the code that follows this statement.
  52.  
  53.     I finally did this....now that routine, and the rest of my loading
  54. sequence, are working well....I think I may have something in my saving
  55. routine killing stuff now, so I have to go look there. 
  56.  
  57. >  MidStr(vers,filbuf,pos,endpos-pos)
  58. >
  59. >[statements removed]
  60. >
  61. >*** StringF() still might work under lucky circumstances.
  62. >  StringF(vtst,'\s \d.\d',nvers,vp,rvers)
  63.  
  64.     The problem was that it would only crash on the second load, most of the
  65. time, so I thought I was not deallocating memory....other occurrences of
  66. StringF not having things defined as string...any exterminators for hire here?
  67.  
  68. >*** As for your run-on problem, it may be a symptom of this.  If it persists
  69. >*** then post, post again!  :-)
  70.  
  71. Got this fixed....realised it ten minutes after the message went out!
  72.  
  73. >
  74. >Later.
  75. >-- Barry
  76.  
  77.  / / /
  78. /_/_/iZ
  79.  
  80. MODULE 'WiZkId'
  81. PROC main()
  82.   wizkid.inetaddress:='Politkill@cup.portal.com'
  83.   wizkid.realname:='Jeffrey J Peden ]['
  84. ENDPROC
  85.  
  86.  
  87. *-- GammaTag Version 2.8 --*
  88. *-- Mister!  Here's your mule!